#pragma once
#include <QSettings>

struct Config {
    double lon0 = 121.4737;
    double lat0 = 31.2304;
    double ppd  = 1000.0;   // pixels per degree
    void load(const QString &file = "map.conf") {
        QSettings s(file, QSettings::IniFormat);
        lon0 = s.value("center/lon", 121.4737).toDouble();
        lat0 = s.value("center/lat", 31.2304).toDouble();
        ppd  = s.value("scale/pixels_per_degree", 1000.0).toDouble();
    }
};
